﻿@model IEnumerable<BskLeague.Models.SeasonTeamPlayer>

@{
    ViewBag.Title = "Manager drużyn i zawodników";
}

@Html.Partial("_Submenu")

<h3>Wpisy na sezon</h3>

<p>
    @Html.ActionLink("Nowy wpis", "CreateSTP")
</p>
<table>
    <tr>
        <th>
            Sezon
        </th>
        <th>
            Drużyna
        </th>
        <th>
            Zawodnik
        </th>
        <th></th>
    </tr>

@foreach (var item in Model) {
    <tr>
        <td>
            @Html.DisplayFor(modelItem => item.Season.SeasonName)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Team.TeamName)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Player.PlayerName) @Html.DisplayFor(modelItem => item.Player.PlayerSurname)
        </td>
        <td>
            @Html.ActionLink("Edytuj", "EditSTP", new { id=item.SeasonTeamPlayerId }) |
            @Html.ActionLink("Usuń", "DeleteSTP", new { id=item.SeasonTeamPlayerId })
        </td>
    </tr>
}

</table>
